package com.bw.service.impl;

import com.bw.entity.Report;
import com.bw.mapper.ReportMapper;
import com.bw.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ReportServiceImpl implements ReportService {

    @Autowired
    private ReportMapper reportMapper;

    /**
     * 新增日报
     * @param report
     */
    @Override
    public void addReport(Report report) {
        reportMapper.addReport(report);
    }

    /**
     *添加中间表对应关系
     * @param map
     */
    @Override
    public void addMid(Map map) {
        reportMapper.addMid(map);
    }

    /**
     *查看日报列表
     * @return
     */
   /* @Override
    public List<Report> findReportList() {
        List<Report> rlist = reportMapper.findReportList();
        return rlist;
    }*/

    @Override
    public List<Report> findReportListById(Integer id) {
        return reportMapper.findReportListById(id);
    }

    @Override
    public int findReportNum(Map map) {

        return reportMapper.findReportNum(map);
    }
}
